package com.youlemall.shop.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.youlemall.pojo.TypeTemplate;
import com.youlemall.service.TypeTemplateService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 2 * @Author: kevin
 * 3 * @Date: 2019/7/20 23:31
 * 4
 */

@RestController
@RequestMapping("/typeTemplate")
public class TypeTemplateController {

	@Reference(timeout = 10000)
 	private TypeTemplateService typeTemplateService;


	@GetMapping("/findOne")
	public TypeTemplate findOne(Long id){
	return 	typeTemplateService.findOne(id);
	}


	@GetMapping("/findSpecByTemplateId")
	public List<Map> findSpecByTemplateId(Long id){
		return  typeTemplateService.findSpecByTemplateId(id);
	}
}
